import http from '../utils/http'


// 查询所有AI角色数据接口

export const get_chatAI = ()=>{
	return http.get('/classes/AIchater')
}




// 录入ai对话数据
export interface CounselorData {
  tags: string[];
  selfId: string;
  name: string;
  otherId: string;
  bio: string;
  statusTag: {
    text: string;
    icon: string;
  };
  url: string;
  description:string,
  serviceCount:string,
  categories:string[]
  
}
export const post_chatai = (data: CounselorData)=>{
	return http.post('/classes/Chats', data);

}


// 1. 根据 otherId 和 selfId 查询是否存在数据
export const getCounselorByIds = (selfId: string, otherId: string) => {
  // LeanCloud 查询语法：where 条件过滤
  return http.get(`/classes/Chats?where=${encodeURIComponent(JSON.stringify({
		selfId,
		otherId
	}
  ))}`);
};